"""
 Flash OS Routines (Automagically Generated)
 Copyright (c) 2017-2017 ARM Limited
"""

flash_algo = {
    'load_address' : 0x20000000,
    'instructions' : [
        0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
        0x4603B510, 0x69804864, 0x0224240F, 0x4C624320, 0x486261A0, 0x486260E0, 0x486260E0, 0x48626120,
        0x20006120, 0x4601BD10, 0xD0022901, 0xD10E2902, 0xBF00E000, 0x68404858, 0x43102202, 0x60504A56,
        0x68404610, 0x43102201, 0x60504A53, 0xBF00BF00, 0x47702000, 0x48504601, 0x22016840, 0x43100252,
        0x60504A4D, 0x68404610, 0x43102208, 0x60504A4A, 0x60082000, 0x484DE002, 0x60104A4D, 0x69804846,
        0x0FC007C0, 0x4844D1F7, 0x22016840, 0x43900252, 0x60504A41, 0x68404610, 0x43902208, 0x60504A3E,
        0x47702000, 0x4603B530, 0x1DC82440, 0x0A0130F8, 0x48390209, 0x01256840, 0x4D374328, 0xBF006068,
        0x6810E005, 0x1D1B6018, 0x1F091D12, 0x29001F24, 0x2C00D001, 0xE002D1F5, 0x4D354834, 0x482E6028,
        0x07C06980, 0xD1F70FC0, 0x6980482B, 0x022D250F, 0xD0064228, 0x69804828, 0x4D274328, 0x200161A8,
        0x4825BD30, 0x25016840, 0x43A802AD, 0x60684D22, 0x68404628, 0x43A82508, 0x60684D1F, 0x68404628,
        0x4328152D, 0x60684D1C, 0x68404628, 0x43282508, 0x60684D19, 0xE0052440, 0x60186810, 0x1D121D1B,
        0x1F241F09, 0xD0012900, 0xD1F52C00, 0x4817E002, 0x60284D17, 0x69804810, 0x0FC007C0, 0x480ED1F7,
        0x250F6980, 0x4228022D, 0x480BD006, 0x43286980, 0x61A84D09, 0xE7C32001, 0x68404807, 0x02AD2501,
        0x4D0543A8, 0x46286068, 0x25086840, 0x4D0243A8, 0x20006068, 0x0000E7B4, 0x40022000, 0x89ABCDEF,
        0x02030405, 0x8C9DAEBF, 0x13141516, 0x0000AAAA, 0x40003000, 0x00000000
    ],

    'pc_Init'            : 0x20000021,
    'pc_UnInit'          : 0x20000047,
    'pc_EraseSector'     : 0x20000075,
    'pc_ProgramPage'     : 0x200000C5,
    'pc_Verify'          : 0x12000001F,
    'pc_EraseChip'       : 0x12000001F,
    'pc_BlankCheck'      : 0x12000001F,
    'pc_Read'            : 0x12000001F,
    
    'static_base'        : 0x20000400,
    'begin_data'         : 0x20000800,
    'begin_stack'        : 0x20000C00,

    'analyzer_supported' : False,

    # Relative region addresses and sizes
    'ro_start'           : 0x00000000,
    'ro_size'            : 0x000001B4,
    'rw_start'           : 0x000001B4,
    'rw_size'            : 0x00000004,
    'zi_start'           : 0x000001B8,
    'zi_size'            : 0x00000000,

    # Flash information
    'flash_start'        : 0x08000000,
    'flash_size'         : 0x00020000,
    'flash_page_size'    : 0x00000080,
}
